package ldk.app.kotlinweibo.apis.beans

/**
 * Created by ke on 17-6-27.
 */
class BaseResponse: IllegalStateException() {
    var request: String? = null
    var error_code: String? = null
    var error: String? = null

    fun hasError(): Boolean{
        return error != null
    }

    fun errorReason(english: Boolean = true): String{
        return error!!
    }

    override val message: String?
        get() = errorReason()
}